/**
 * Created by litao on 2018/10/15.
 */
export default (http) => {
    return {
        login(data) {
            return http.json({
                url: '/login',
                data:Object.assign(data||{},{
                    adminFlag:'liTaoXWB'
                })
            })
        },

        getCurrentUser (){
            return http({
                url: '/sys/account/info',
                method: 'post'
            });
        },

        modifyField (data){
            return http({
                method: 'post',
                url: `/sys/account/modifyField?fieldName=${data.fieldName}&fieldValue=${data.fieldValue}`
            })
        },

        queryAll (data){
            return http.json({
                url: '/sys/account/queryAll',
                data
            })
        },

        modifyPassword (data){
            return http.json({
                url: '/sys/account/modifyPassword',
                data
            })
        }
    }
}
